let btn = document.querySelector('button');
let clickStart = document.querySelector('.clickStart');
let content = document.querySelector('.content');
let timer = 5;



inNewPage();

/**
 * 点击开始计时
 * */

    setInterval(inNewPage, 1000);


/**
 * 跳转到新的页面
 */
function inNewPage() {
    if (timer === 0) {
        location.href = 'index.jsp';
    } else {
        content.innerHTML = timer + '秒后页面将跳转';
        timer--;
    }
}